package com.feng.cloud.system.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName VueRouter
 * @Description TODO
 * @Author Better Feng
 * @Date 2019/12/21 22:21
 * @Version 1.0
 **/
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class VueRouter<T> implements Serializable {
    @JsonIgnore
    private String id;
    @JsonIgnore
    private String parentId;

    private String path;
    private String name;
    private String component;
    private String redirect;
    private RouterMeta meta;
    private Boolean hidden = false;
    private Boolean alwaysShow = false;
    private List<VueRouter<T>> children;

    @JsonIgnore
    private Boolean hasParent = false;

    @JsonIgnore
    private Boolean hasChildren = false;

    public void initChildren(){
        this.children = new ArrayList<>();
    }
}
